+2008-08-11 Matthias Clasen <mclasen@redhat.com>
+
+ Bug 546616 – CUPS print backend uses 1.2 API without guards
+
+ * modules/printbackends/cups/gtkcupsutils.[hc]: Make use
+ of cups 1.2 api dependent on the HAVE_CUPS_1_2 define.
+ Patch by Sven Herzberg and Richard Hult
+
2008-08-11 Michael Natterer <mitch@imendio.com>
Bug 547270 – Make GtkHSV public
gtk_cups_connection_test_new (const char *server)
{
GtkCupsConnectionTest *result = NULL;
+#ifdef HAVE_CUPS_API_1_2
gchar *port_str = NULL;
result = g_new (GtkCupsConnectionTest, 1);
result->success_at_init = FALSE;
result->success_at_init = gtk_cups_connection_test_is_server_available (result);
+#else
+ result = g_new (GtkCupsConnectionTest, 1);
+#endif
return result;
}
gboolean
gtk_cups_connection_test_is_server_available (GtkCupsConnectionTest *test)
{
+#ifdef HAVE_CUPS_API_1_2
http_addrlist_t *iter;
gboolean result = FALSE;
gint flags;
return result;
}
+#else
+ return TRUE;
+#endif
}
/* This function frees memory used by the GtkCupsConnectionTest structure.
if (test == NULL)
return;
+#ifdef HAVE_CUPS_API_1_2
test->current_addr = NULL;
httpAddrFreeList (test->addrlist);
if (test->socket != -1)
close (test->socket);
test->socket = -1;
}
+#endif
g_free (test);
}
struct _GtkCupsConnectionTest
{
+#ifdef HAVE_CUPS_API_1_2
http_addrlist_t *addrlist;
http_addrlist_t *current_addr;
gboolean success_at_init;
gint socket;
+#endif
};
#define GTK_CUPS_REQUEST_START 0